package com.tangly.module.vo;

import com.tangly.module.entity.LoanRateEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

/**
 * created by yehao on 2018/7/27.
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "计算器利率")
public class AppLoanRateVO {

    @ApiModelProperty(value = "主键")
    private Long id;

    @ApiModelProperty(value = "利率类型")
    private String type;

    @ApiModelProperty(value = "利率")
    private Float rate;

    public static AppLoanRateVO convert(LoanRateEntity loanRateEntity){
        AppLoanRateVO vo=new AppLoanRateVO();
        BeanUtils.copyProperties(loanRateEntity,vo);
        return  vo;
    }
}
